import com.item.common.PageResult;
import com.pxx.item.pojo.Sku;
import com.pxx.item.pojo.vo.SpuVo;
import com.pxx.search.SearchApp;
import com.pxx.search.client.GoodsClient;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import java.util.List;

@RunWith(SpringRunner.class)
@SpringBootTest(classes = SearchApp.class)
public class cs {

    @Autowired
    GoodsClient goodsClient;

    @Test
    public void testquery(){
        List<Sku> skus = goodsClient.querySkuListBySpuId(2L);
        skus.forEach(sku -> {
            System.out.println(sku);
        });


    }
    @Test
    public void testQueyr2(){
        PageResult<SpuVo> spuVoPageResult = goodsClient.querySpuVoPage(null, true, 1, 5);
        spuVoPageResult.getItems().forEach(sku -> {
            System.out.println(sku);
        });
    }
}
